import Taro, { useState, useEffect } from "@tarojs/taro";
import { View, Input, Button, Label } from "@tarojs/components";
import styles from "./index.module.less";
import testTap from './components/testTap'
const Index = () => {
  const [count, setCount] = useState("xxxxx");
  useEffect(() => {
    console.log("开始啦", count);
    console.log("styles: ", styles);
  }, []);
  useEffect(() => {
    console.log("count: ", count);
  }, [count]);
  return (
    <View>
      aaaa:{count}
      <Input
        onInput={(e) => {
          handleInputChange(e);
        }}
        value={count}
        className={styles.inputx}
        type="text"
        placeholder="一个输入框"
      ></Input>
      <Button
        onClick={() => {
          handleEdit();
        }}
      >
        大按钮哦
      </Button>
      <view>隔离</view>
      <Label>
        <view>跟新数据</view>
        <Button onClick={handleEdit}></Button>
      </Label>
      <testTap></testTap>
    </View>
  );
  function handleEdit() {
    console.log("xx");
  }
  function handleInputChange(e) {
    const { value } = e.currentTarget;
    setCount(value);
  }
};

export default Index;
